#ifndef __BSP_RF_DRV_H__
#define __BSP_RF_DRV_H__

#ifdef __cplusplus
extern "C"{
#endif


typedef struct{
	const char *pdevname;
	int (*bsp_rf_Init)(void *parg);
	void (*bsp_SetSpeed)(unsigned char SPI_BaudRatePrescaler);
	int (*bsp_rf_sendchar)(char reg);
	int (*bsp_rf_BurstWrite)(void *pbuf,int iSize);
	int (*bsp_rf_BurstRead)(void *pbuf,int iSize);
	int (*bsp_rf_BurstWritethenRead)(void *pwrite,void *pread,int iSize);
}t_rf_fileops,*pt_rf_fileops;


pt_rf_fileops get_rf_fops(void);

#define RF_SPIX					SPI1

#define RF_SPI_MISO_GPIO		GPIOA
#define RCC_RF_SPI_GPIO			RCC_APB2Periph_GPIOA
#define RCC_RF_SPI				RCC_APB2Periph_SPI1
#define RF_SPI_MISO_PIN			GPIO_Pin_6
#define RF_SPI_MOSI_PIN			GPIO_Pin_7
#define RF_SPI_SCK_PIN			GPIO_Pin_5

#define RF_SPI_CS_GPIO			GPIOE
#define RCC_RF_CS				RCC_APB2Periph_GPIOE
#define RF_SPI_CS_PIN			GPIO_Pin_5

#define RF_SPI_IRQ_GPIO			GPIOA
#define RCC_RF_IRQ				RCC_APB2Periph_GPIOA
#define RF_SPI_IRQ_PIN			GPIO_Pin_4


#define RF_SPI_GP2_GPIO			GPIOE
#define RCC_RF_GP2				RCC_APB2Periph_GPIOE
#define RF_SPI_GP2_PIN			GPIO_Pin_6
						

#ifdef __cplusplus
}
#endif
#endif



